﻿using System;
using System.Collections.Generic;
using System.Text;

namespace YouHP.Model
{
    public class LabcheckInfo : IHydratable
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public string Intro { get; set; }
        public string Desp { get; set; }
        public DateTime UpdateTime { get; set; }
        public int IsQuantified { get; set; }
        public string MeasurementUnits { get; set; }    /*计量单位*/
        public string ChoicesDescription { get; set; }  /*范围描述（在非量化中存放选项值，多个选项采用下面格式，如：“1=好@2=坏”）*/
        public string LimitValues { get; set; }         /*量化值范围1@100*/
        public double MinValue { get; set; }               /*最小值*/
        public double MaxValue { get; set; }               /*最大值*/
        public string NormalValues { get; set; }        /*正常量化值范围40@60*/
        public double NormalMinValue { get; set; }         /*正常范围最小值*/
        public double NormalMaxValue { get; set; }         /*正常范围最大值*/
        public int IsValid { get; set; }                /*是否已经处理(0-未处理, 1-已处理)*/
        public int UserId { get; set; }                 /*上传用户id*/
        public string GridValues { get; set; }          /*坐标刻度值， 说明：刻度的字符串中间以’,’分隔*/
        public string ShortName { get; set; }           /*短名称*/

        public int ChartIndex { get; set; }
        public int AxisIndex { get; set; }
        
        public LabcheckInfo()
        {
            Id = -1;
            MinValue = MaxValue = NormalMinValue = NormalMaxValue = 0;
            NormalValues = LimitValues = GridValues = ShortName = "";
        }

        #region IHydratable 成员
        public bool Fill(System.Data.IDataReader dr)
        {
            return false;
        }
        #endregion    
    }
    public class LabcheckInfoComparer : IComparer<LabcheckInfo>
    {
        public int Compare(LabcheckInfo X, LabcheckInfo Y)
        {
            return X.ChartIndex - Y.ChartIndex;
        }

    }
}
